$(document).ready(function(){
     var yOffset = 30;
     var	xOffset = 20;
     $(".small_img_products").hover(function(e){
         $("body").append("<span id = 'preview' ><img  src='"+ $(this).attr('data-src') + "'/><p class = 'caption'>" + $(this).attr('data-content') + "</p></span>");
         $("#preview")
    			.css("top",(e.pageY + xOffset) + "px")
    			.css("left",(e.pageX + yOffset) + "px")
    			.fadeIn("fast");
     },function(){
         	$("#preview").remove();
     });
     $(".small_img_products").mousemove(function(e){
    		$("#preview")
    			.css("top",(e.pageY + xOffset) + "px")
    			.css("left",(e.pageX + yOffset) + "px");
    	});
     $('.drop-down-type').hover(function(){
         $('.drop-down-menu').slideDown(200)
     },function(){
         $('.drop-down-menu').slideUp(100);
     });
     $('.part-page').find('a').eq(0).addClass('page-current');
     $('.input_search').keypress(function(content){
         
         
     });
      $("#pro_price").keyup(function(){
         var price = $(this).val();
         if(!price || price == 0){
            ('.number_format').html('0 đ');
         }
         format = formatDollar(parseInt(price));
         $('.number_format').html(format); 
      });
      // Ẩn hiện box support
      $('.support .caption').click(function(){
         if($('.support').hasClass('show-sp')){
            $('.support').removeClass('show-sp');
            $('.support').addClass('hide-sp');
         }else{
            $('.support').addClass('show-sp');
            $('.support').removeClass('hide-sp');
         }
      });
});
